for digist in range(1, 10):
	if digist == 1:
		print(f"{digist}st")
	elif digist == 2:
		print(f"{digist}nd")
	elif digist == 3:
		print(f"{digist}rd")
	else:
		print(f"{digist}th")